package com.pwt.entity;

import com.pwt.annotation.Update;
import io.swagger.v3.oas.annotations.media.Schema;
import com.pwt.entity.base.BaseEntity;
import javax.persistence.*;
import javax.validation.constraints.NotBlank;

import lombok.EqualsAndHashCode;
import lombok.Data;

import lombok.NoArgsConstructor;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import java.io.Serializable;


/**
 * WhatStatistics
 *
 * @author auto generated
 * @date 2021-09-04 14:18:52
 */
@EqualsAndHashCode
@Data
@NoArgsConstructor
@Entity
@Table(name = "[what_statistics]")
@Schema(name = "WhatStatistics")
@DynamicInsert
@DynamicUpdate
public class WhatStatistics implements Serializable {

	@Id
	@GeneratedValue(generator="system_uuid")
	@GenericGenerator(name="system_uuid",strategy="uuid")
	@Column(name = "id")
	@Schema(description = "ID")
	@NotBlank(groups = Update.class,message = "修改时必传")
	protected String id;

	/**
	 * 监控指标id，关联what_result.id
	 * nullable : true
	 * default  : null
	 */
	@Schema(name = "whatResultId",description = "监控指标id，关联what_result.id")
	@Column(name = "what_result_id", nullable = true, length = 32)
	private String whatResultId;

	/**
	 * 产品统计id,关联product_statistics.id
	 * nullable : true
	 * default  : null
	 */
	@Schema(name = "productStatisticsId",description = "产品统计id,关联product_statistics.id")
	@Column(name = "product_statistics_id", nullable = true, length = 32)
	private String productStatisticsId;
}
